package ModelLayer;



import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The test class PartSaleTest.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class PartSaleTest
{

    /**
     * Default constructor for test class PartSaleTest
     */
    public PartSaleTest()
    {
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
        
    }

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }

    @Test
    public void TestAddItem()
    {
        ModelLayer.Item item2 = new ModelLayer.Item("TestCode", "TestName", "TestType", 100, 10);
        ModelLayer.PartSale partSale1 = new ModelLayer.PartSale(item2, 1);
        assertEquals(item2, partSale1.getItem());
    }

    @Test
    public void TestAmount()
    {
        ModelLayer.Item item1 = new ModelLayer.Item("TestCode", "TestName", "TestType", 100, 10);
        ModelLayer.PartSale partSale1 = new ModelLayer.PartSale(item1, 1);
        assertEquals(1, partSale1.getAmount());
    }
}


